package com.zhongan.domain.usercenter;

import java.util.Date;

/**
 * 客户端信息表
 * table:oauth_client_details
 */
public class OauthClientDetails {

    private String clientId;                //主键，唯一标识每一个客户端(client)在实际应用中的另一个名称叫appKey
    private Date createTime;                //数据的创建时间,精确到秒
    private String autoApprove;             //设置用户是否自动Approval操作, 默认值为 'false'
    /**
     * 指定客户端支持的grant_type,可选值包括authorization_code,password,refresh_token,implicit,client_credentials,
     * 若支持多个grant_type用逗号(,)分隔,如: "authorization_code,password".
     */
    private String authorizedGrantTypes;
    /**
     * 指定客户端所拥有的Spring Security的权限值,可选, 若有多个权限值,用逗号(,),对于是否要设置该字段的值,要根据不同的grant_type来判断
     */
    private String authorities;
    private Integer refreshTokenValidity;   //设定客户端的refresh_token的有效时间值(单位:秒)
    private String additionalInformation;   //这是一个预留的字段,在Oauth的流程中没有实际的使用
    private Integer archived;               //用于标识客户端是否已存档(即实现逻辑删除),默认值为'0'(即未存档)
    private Integer trusted;                //设置客户端是否为受信任的,默认为'0'(即不受信任的,1为受信任的)
    private Integer accessTokenValidity;    //设定客户端的access_token的有效时间值(单位:秒)
    private String scope;                   //ָ指定客户端申请的权限范围,若有多个权限范围用逗号(,)分隔
    private String webServerRedirectUri;    //客户端的重定向URI,可为空,
    private String clientSecret;            //用于指定客户端(client)的访问密匙,在实际应用中的另一个名称叫appSecret
    /**
     * 客户端所能访问的资源id集合,多个资源时用逗号(,)分隔
     * 在实际应用中, 我们一般将资源进行分类,并分别配置对应的‹oauth2:resource-server,如订单资源配置一个‹oauth2:resource-server, 用户资源又配置一个
     */
    private String resourceIds;


    public String getClientId() {
        return this.clientId;
    }

    public void setClientId(String clientId) {
        this.clientId = clientId;
    }

    public Date getCreateTime() {
        return this.createTime;
    }

    public void setCreateTime(Date createTime) {
        this.createTime = createTime;
    }

    public String getAutoApprove() {
        return autoApprove;
    }

    public void setAutoApprove(String autoApprove) {
        this.autoApprove = autoApprove;
    }

    public String getAuthorizedGrantTypes() {
        return this.authorizedGrantTypes;
    }

    public void setAuthorizedGrantTypes(String authorizedGrantTypes) {
        this.authorizedGrantTypes = authorizedGrantTypes;
    }

    public String getAuthorities() {
        return this.authorities;
    }

    public void setAuthorities(String authorities) {
        this.authorities = authorities;
    }

    public Integer getRefreshTokenValidity() {
        return this.refreshTokenValidity;
    }

    public void setRefreshTokenValidity(Integer refreshTokenValidity) {
        this.refreshTokenValidity = refreshTokenValidity;
    }

    public String getAdditionalInformation() {
        return this.additionalInformation;
    }

    public void setAdditionalInformation(String additionalInformation) {
        this.additionalInformation = additionalInformation;
    }

    public Integer getArchived() {
        return this.archived;
    }

    public void setArchived(Integer archived) {
        this.archived = archived;
    }

    public Integer getTrusted() {
        return this.trusted;
    }

    public void setTrusted(Integer trusted) {
        this.trusted = trusted;
    }

    public Integer getAccessTokenValidity() {
        return this.accessTokenValidity;
    }

    public void setAccessTokenValidity(Integer accessTokenValidity) {
        this.accessTokenValidity = accessTokenValidity;
    }

    public String getScope() {
        return this.scope;
    }

    public void setScope(String scope) {
        this.scope = scope;
    }

    public String getWebServerRedirectUri() {
        return this.webServerRedirectUri;
    }

    public void setWebServerRedirectUri(String webServerRedirectUri) {
        this.webServerRedirectUri = webServerRedirectUri;
    }

    public String getClientSecret() {
        return this.clientSecret;
    }

    public void setClientSecret(String clientSecret) {
        this.clientSecret = clientSecret;
    }

    public String getResourceIds() {
        return this.resourceIds;
    }

    public void setResourceIds(String resourceIds) {
        this.resourceIds = resourceIds;
    }

}
